package com.haima.ziliao.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.haima.common.annotation.Excel;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;
import java.util.Date;

/**
 * 兑换码对象 p_cdkeys
 * 
 * @author hima
 * @date 2025-05-19
 */
public class PCdkeys implements Serializable
{
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /** ID */
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;

    /** KEY */
    @Excel(name = "KEY")
    @TableField("keystr")
    private String keystr;

    /** 是否使用 */
    @Excel(name = "是否使用")
    @TableField("used")
    private Integer used;

    /** 时长 */
    @Excel(name = "时长")
    @TableField("days")
    private Integer days;

    /** 使用用户 */
    @Excel(name = "使用用户")
    @TableField("useuid")
    private Long useuid;

    @TableField("vid")
    private Long vid;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("addtime")
    private Date addtime;

    /** 使用时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "使用时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("updtime")
    private Date updtime;

    @TableField(exist = false)
    private Integer num;

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public Long getVid() {
        return vid;
    }

    public void setVid(Long vid) {
        this.vid = vid;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setKeystr(String keystr) 
    {
        this.keystr = keystr;
    }

    public String getKeystr() 
    {
        return keystr;
    }
    public void setUsed(Integer used) 
    {
        this.used = used;
    }

    public Integer getUsed() 
    {
        return used;
    }
    public void setDays(Integer days) 
    {
        this.days = days;
    }

    public Integer getDays() 
    {
        return days;
    }
    public void setUseuid(Long useuid) 
    {
        this.useuid = useuid;
    }

    public Long getUseuid() 
    {
        return useuid;
    }
    public void setAddtime(Date addtime) 
    {
        this.addtime = addtime;
    }

    public Date getAddtime() 
    {
        return addtime;
    }
    public void setUpdtime(Date updtime) 
    {
        this.updtime = updtime;
    }

    public Date getUpdtime() 
    {
        return updtime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("keystr", getKeystr())
            .append("used", getUsed())
            .append("days", getDays())
            .append("useuid", getUseuid())
            .append("addtime", getAddtime())
            .append("updtime", getUpdtime())
            .append("vid", getVid())
            .toString();
    }
}
